for j in range(1,10):
	for i in range(1,j+1):
		print("{}*{}={:<4}".format(i,j,i*j),end=" ")
print("  ")

for j in range(9,0,-1):
	for i in range(1,j+1):
		print("{}*{}={:<4}".format(i,j,i*j,end=" "))
print(" ")